Skip to content

monobean: add mock unitest & set default ligtht theme#1241

Merged
yyk808 merged 17 commits into
gitmono-dev:mainfrom
pleasedontbreak123:feature/fit-contextapi
Jul 18, 2025
Merged

monobean: add mock unitest & set default ligtht theme#1241
yyk808 merged 17 commits into
gitmono-dev:mainfrom
pleasedontbreak123:feature/fit-contextapi

Conversation

@pleasedontbreak123

Copy link
Copy Markdown
Contributor

add mock test
fix theme selector button

@vercel

vercel Bot commented Jul 18, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2025 11:58am

This comment was marked as outdated.

Signed-off-by: pleasedontbreak123 <nabeiyq@126.com>

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds mock testing capabilities and fixes the theme selector functionality. The main purpose is to enable proper unit testing with mock context and fix the action group mapping for the theme selector button.

  • Implements mock testing infrastructure for unit tests
  • Fixes theme selector button action group mapping from "win.style-variant" to "style.style-variant"
  • Changes default theme from 'system' to 'light'

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vault/src/integration/vault_core.rs Makes config method public and adds excessive whitespace
monobean/src/window.rs Implements proper action group for theme selector functionality
monobean/src/core/mega_core.rs Adds mock context support and enables previously commented-out tests
monobean/resources/org.Web3Infrastructure.Monobean.gschema.xml Changes default theme from 'system' to 'light'
monobean/resources/gtk/theme_selector.ui Updates action names from "win.style-variant" to "style.style-variant"
monobean/Cargo.toml Adds toml dependency for configuration handling
context/src/lib.rs Implements mock method for testing and adds test storage import
Comments suppressed due to low confidence (7)

Comment thread monobean/src/core/mega_core.rs Outdated
Comment thread context/src/lib.rs
yyk808 and others added 2 commits July 18, 2025 19:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com>
Comment thread monobean/resources/gschemas.compiled Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this

@yyk808
yyk808 added this pull request to the merge queue Jul 18, 2025
Merged via the queue into gitmono-dev:main with commit 63bb915 Jul 18, 2025
12 checks passed
liuyangjuncong20202570 pushed a commit to liuyangjuncong20202570/mega that referenced this pull request Jul 20, 2025
* adapt new conntext api

* monobean:adapt new context api

* passed unit tests

* fix clippy erro

* fix clippy erro

* Add mock implementations for testing

* add mock test & fix theme selector button

* test

* add mock test & fix theme selector button

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com>

* Delete monobean/resources/gschemas.compiled

---------

Signed-off-by: pleasedontbreak123 <nabeiyq@126.com>
Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com>
Co-authored-by: Quanyi Ma <eli@patch.sh>
Co-authored-by: Neon <71858127+yyk808@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants